package com.lan.workflow.exception;

public class BaseException extends RuntimeException {

    private static final long serialVersionUID = -473024959042985152L;

    private String code;

    private String msg;

    public BaseException(String code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public BaseException(String code, String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
